package com.colter.project.data.structure.tree;

public class Test {
	public static void main(String[] args) {
		TreeNode<String> node1 = new TreeNode<String>("A");
		TreeNode<String> node2 = new TreeNode<String>("B");
		TreeNode<String> node3 = new TreeNode<String>("C");
		TreeNode<String> node4 = new TreeNode<String>("D");
		TreeNode<String> node5 = new TreeNode<String>("E");
		TreeNode<String> node6 = new TreeNode<String>("F");
		TreeNode<String> node7 = new TreeNode<String>("G");

		BinaryTree2<String> tree1 = new BinaryTree2<>(node1);
		BinaryTree2<String> tree2 = new BinaryTree2<>(node2);
		BinaryTree2<String> tree3 = new BinaryTree2<>(node3);
		BinaryTree2<String> tree4 = new BinaryTree2<>(node4);
		BinaryTree2<String> tree5 = new BinaryTree2<>(node5);
		BinaryTree2<String> tree6 = new BinaryTree2<>(node6);
		BinaryTree2<String> tree7 = new BinaryTree2<>(node7);

		tree1.addLeftChild(tree2);
		tree1.addRightChild(tree3);
		tree2.addLeftChild(tree4);
		tree2.addRightChild(tree5);
		tree3.addLeftChild(tree6);
		tree3.addRightChild(tree7);

		tree1.inOrder(tree1.getRoot());

		BinaryTree<String> t1 = new BinaryTree<>("A");
		BinaryTree<String> t2 = new BinaryTree<>("B");
		BinaryTree<String> t3 = new BinaryTree<>("C");
		BinaryTree<String> t4 = new BinaryTree<>("D");
		BinaryTree<String> t5 = new BinaryTree<>("E");
		BinaryTree<String> t6 = new BinaryTree<>("F");
		BinaryTree<String> t7 = new BinaryTree<>("G");
		t1.addLeftChild(t2);
		t1.addRightChild(t3);
		t2.addLeftChild(t4);
		t2.addRightChild(t5);
		t3.addLeftChild(t6);
		t3.addRightChild(t7);

		t1.inOrder(t1);

	}
}
